package com.boot;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import org.mybatis.spring.annotation.MapperScan;
import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

@SpringBootApplication
@MapperScan("com.boot.mapper")
public class App {
	public static void main(String[] args) {
		SpringApplication.run(App.class, args);
	}
//
//	@Bean(name = "mapperObject")
//	public ObjectMapper getObjectMapper() {
//		ObjectMapper om = new ObjectMapper();
//		JavaTimeModule javaTimeModule = new JavaTimeModule();
//		javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
//		om.registerModule(javaTimeModule);
//		return om;
//	}

}
